package com.ssy.lingxi.settle.accounts.controller;

import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.dto.request.ApplyAmountDetailSunQueryVO;
import com.ssy.lingxi.dto.request.ApplyAmountDetailTotalSunQueryVO;
import com.ssy.lingxi.dto.request.ApplyAmountSunQueryVO;
import com.ssy.lingxi.dto.response.ApplyAmountDetailSunVO;
import com.ssy.lingxi.dto.response.ApplyAmountDetailTotalSunVO;
import com.ssy.lingxi.dto.response.ApplyAmountSunVO;
import com.ssy.lingxi.settle.accounts.service.IApplyAmountService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 平台结算管理-业务请款-内部接口
 * @author 彭冬冬
 * @version 2.0.0
 * @date 2022/3/8 14:41
 */
@RestController
@RequestMapping("/settle/accounts/business/apply/amount/feign")
public class ApplyAmountFeignController {

    @Resource
    private IApplyAmountService service;


    /**
     * 合同服务-查询请款执行请款
     * @param queryVO 查询条件
     * @return 请款执行请款
     */
    @RequestMapping(value = "/pageContractExecuteDetail", method = RequestMethod.POST)
    public Wrapper<PageData<ApplyAmountDetailSunVO>> pageContractExecuteDetail(@RequestBody ApplyAmountDetailSunQueryVO queryVO) {
        return service.pageContractExecuteDetail(queryVO);
    }

    /**
     * 合同服务-查询请款执行请款汇总
     * @param queryVO 查询条件
     * @return 请款执行请款汇总
     */
    @RequestMapping(value = "/pageContractExecuteDetailSum", method = RequestMethod.POST)
    public Wrapper<List<ApplyAmountDetailTotalSunVO>> pageContractExecuteDetailSum(@RequestBody ApplyAmountDetailTotalSunQueryVO queryVO) {
        return service.pageContractExecuteDetailSum(queryVO);
    }

    /**
     * 合同服务-查询 合同请款情况统计
     * @param queryVO 查询条件
     * @return 合同请款情况统计
     */
    @RequestMapping(value = "/pageListForSummaryByParty", method = RequestMethod.POST)
    public Wrapper<PageData<ApplyAmountSunVO>> pageListForSummaryByParty(@RequestBody ApplyAmountSunQueryVO queryVO) {
        return service.pageListForSummaryByParty(queryVO);
    }

    /**
     * 合同服务-查询 合同请款付款情况统计
     * @param queryVO 查询条件
     * @return 合同请款付款情况统计
     */
    @RequestMapping(value = "/listForPaySummaryByParty", method = RequestMethod.POST)
    public Wrapper<List<ApplyAmountSunVO>> listForPaySummaryByParty(@RequestBody ApplyAmountSunQueryVO queryVO) {
        return service.listForPaySummaryByParty(queryVO);
    }
}
